<?php 
include "../public/header.php";
 ?>


<!-- 右侧主体部分开始 -->
<div class="col-md-9">
		<h1 class="page-header">申请人列表</h1>
			<table class="table table-bordered table-hover table-striped text-center ">
				<!-- 查询所有申请 -->
				 <?php 
					include "../public/common.php";
					$sql = "select * from apply";
					if($result = $conn->query($sql)) {
						 while ($row = $result->fetch_assoc()) {
				?>
					<tr>
						<td>
							<?php 
								echo $row['apply_id'];
							 ?>
						</td>
						<td>
							<?php 
								echo $row['apply_user'];
							 ?>
						</td>
						<td>
							<?php 
								echo $row['apply_tel'];
							 ?>
						</td>
						<td>
							<?php 
								if($row['apply_status'] == 0) {
									echo "<a href='apply_check?id={$row["apply_id"]}' class='btn btn-primary'>同意申请</a>";
								}else {
									echo '<a href="javascript:" class="btn btn-success">申请通过</a>';
								}
								// echo $row['apply_status'];
							 ?>
						</td>
					</tr>
				<?php	  
					    }
					}
				  ?>

					
				
			
			</table>
		</div>
</div>
<!-- 右侧主体部分结束 -->
 <?php 
include "../public/footer.php";
  ?>